package com.piece.module.generator.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

@Data
@Entity
@NoArgsConstructor
@Table(name = "tb_sys_db")
@ApiModel(value = "系统数据源表:tb_sys_db")
public class TbSysDb implements Serializable {

    @Id
    @Column(name = "db_key")
    @ApiModelProperty(value = "数据库标识")
    private String dbKey;

    @Column(name = "db_name")
    @ApiModelProperty(value = "数据库名称")
    private String dbName;

    @Column(name = "url", length = 150)
    @ApiModelProperty(value = "url")
    private String url;

    @Column(name = "driver_class_name", length = 100)
    @ApiModelProperty(value = "驱动名称")
    private String driverClassName;

    @Column(name = "username", length = 50)
    @ApiModelProperty(value = "用户名")
    private String username;

    @Column(name = "password", length = 50)
    @ApiModelProperty(value = "密码")
    private String password;

    @Column(name = "status")
    @ApiModelProperty(value = "状态", notes = "0=正常, 1=删除")
    private String status;
}
